home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MISC / SHELL.ARC / Shell / Sources / c / PlainRect < prev    next >
Encoding:
Text File  |  1994-06-25  |  886 b   |  50 lines

  1. #include "Shell.RedrawToSp.h"
  2. #include "Shell.PlainRect.h"
  3.  
  4.  
  5.  
  6.  
  7. static void    Shell_PlainRectDisplayer(
  8.     Shell_convertpoint    convert,
  9.     wimp_point        rectsize,
  10.     void            *reference,
  11.     const wimp_rect        *redrawrect
  12.     )
  13. {
  14. UNUSED( redrawrect);
  15. UNUSED( reference);
  16. UNUSED( convert);
  17. UNUSED( rectsize);
  18. /* nothing to do here - a plain rect is just a plain rect    */
  19. }
  20.  
  21.  
  22.  
  23.  
  24. static BOOL Shell_PlainRectSaver( char *filename, Shell_rectblock *r)
  25. {
  26. return Shell_SaveRectAsSprite( filename, r, FALSE /*don't use greyscale palette - use current mode*/);
  27. }
  28.  
  29.  
  30.  
  31. Shell_rectblock    *Shell_AddPlainRect(
  32.     Shell_windblock *w,
  33.     int xmin, int ymin,
  34.     int xmax, int ymax
  35.     )
  36. {
  37.     Shell_rectblock        *r;
  38.  
  39. r = Shell_AddRectangle2( w, xmin, ymin, xmax, ymax, Shell_PlainRectDisplayer, NULL);
  40.  
  41. Shell_MakeRectIcon( r, colour_TRANSPARENT, colour_TRANSPARENT, "R1");
  42.  
  43. r->saver    = Shell_PlainRectSaver;
  44. r->filetype    = 0xff9;
  45.  
  46. return r;
  47. }
  48.  
  49.  
  50.